1.Field of the Invention
This invention relates to the field of computer networking, and in particular to an efficient implementation of a loop initialization process.
2. Description of the Related Art
Internetworking of high-performance computers has become the focus of much attention in the data communications industry. Performance improvements in processors and peripherals, along with the move to distributed architectures such as client/server, have spawned increasingly data-intensive and high-speed networking applications, such as medical imaging, multimedia, and scientific visualization. However, the interconnections between the systems and their input/output devices cannot keep up with the blinding data rates, nor can they provide the distances needed for local area networks spanning campus-wide areas.
According to "Amdahl's Law", a megabit per second of input/output (I/O) capability is needed for every MIPS of processor performance. Current communications standards top out at just over 100 megabits per second, not nearly fast enough, as technical computing applications already demand processors exceeding 1,000 MIPS. The deficiencies in current transmission rates results in the communications channel becoming a bottleneck to system performance.
A new protocol known as Fibre Channel is 10 to 250 times faster than existing networks, transmitting at rates exceeding 1 Gbps in both directions simultaneously. It defines standard media and signaling conventions for transporting data in a serial fashion, it provides an error correcting channel code and a frame structure for transporting the data, it sets out a flow control methodology, creates some common services, and supports interfaces to existing higher level protocols such as SCSI (small computer system interface). The Fibre Channel protocol can be applied to various network topologies including point-to-point, ring, and switched. The Fibre Channel protocol is being proposed as an ANSI (American National Standards Institute, Inc.) standard, and a multitude of reference material is readily available at http://www.fibrechannel.com.
Communication across the Fibre Channel is provided using data frames. Consecutive data frames travelling in one direction form a sequence, and a group of related sequences combines to form an exchange. The higher level protocols supported by Fibre Channel perform "operations" such as: open, read, write, close, etc. An exchange may correspond to one of these operations. Each active sequence in an exchange is provided with a unique sequence identifier.
Data frames are separated by approximately six Transmission Words which serve multiple functions. The Transmission Words are drawn from a set of primitive signals which includes IDLE, ARBx and LIP. IDLE signals are fill words. ARBx signals indicate that a port x desires control of the loop. LIP signals indicate that a port wants to take the loop through the initialization process and obtain a loop address. To allow for different reception and transmission data rates, the number of Transmission Words between data frames can be adjusted. For example if the transmitter is transmitting at a slightly higher data rate than the rate at which data is being received, then the transmitter may occasionally insert an additional Transmission Word between data frames to allow more time for data to be received.
At power-up and after loop resets due to errors, the loop begins an initialization process. Each of the ports functions according to a Loop Port State Machine (LPSM) such as that shown in FIG. 1. When an event occurs (e.g. a loop reset), the port enters INITIALIZING state 12. INITIALIZING state 12, the port sends LIP Transmission Words continuously until it detects a LIP Transmission Word. Upon detecting a LIP Transmission Word the port enters OPEN-INIT state 14. In OPEN-INIT state 14, the port sends Loop Initialization Select Master (LISM) data frames to select a port on the loop to be the Loop Initialization Master. The manner in which this occurs will be discussed further below. While in this state each port determines whether it is the Loop Initialization Master. If a port determines that it is Loop Initialization Master, it initiates the remaining steps for determining loop addresses for each of the loop ports. Once these steps have been completed, the Loop Initialization Master sends a CLS Transmission Word to indicate to each of the ports that the initialization process is complete. Upon receiving the CLS Transmission Word, each of the ports enters the MONITORING state 16.
In MONITORING state 16 a port for the most part simply re-transmits everything it receives until one of two things happens: (1) it detects an OPNx Transmission Word where x is the port's loop address, or (2) it determines that it needs access to the loop. In the first case, the port transitions to OPENED state 28. In the second case, the port transitions to ARBITRATING state 18.
In ARBITRATING state 18, a port begins transmitting ARBx Transmission Words, and continues until it receives an ARBy Transmission Word. At this point, if y=x, then the port transitions to the ARBITRATION WON state 20. If y&lt;x, the port begins re-transmitting the ARBy Transmission Words. Otherwise, the port ignores the ARBy Transmission Word.
Upon reaching the ARBITRATION WON state 20, the port determines if the reason for access was to perform a data exchange or to become a non-participant on the loop. In the former case, the port transmits an OPNy Transmission Word to open a connection to a remote node y, and transitions to the OPEN state 24. In the latter case, the port places itself in a bypass mode, and re-enters MONITORING state 16.
In OPEN state 24, the port begins sending data frames to transfer any outgoing data to the remote node. This continues until the port has exhausted all buffer credits from the remote node or until all outgoing data has been sent. The port concludes the outgoing data with a CLS Transmission Word. If during the transfer of data the port receives a CLS Transmission Word, it enters the RECEIVED CLOSE state 26. Otherwise, if the port is expecting a transfer of data from the remote node, or wishes to conduct an exchange with another remote node, the port enters the TRANSFER state 22, otherwise the port enters the XMITTED CLOSE state 30. After the remote node finishes sending data frames, it will send a CLS Transmission Word. From the XMITTED CLOSE state 30, when the port receives the CLS Transmission Word, it will return to the MONITORING state 16.
After the port receives a CLS Transmission Word in the TRANSFER state 22, if it wishes to conduct an exchange with another remote node, it sends an OPNy Transmission Word to the new remote node, and enters OPEN state 24. Otherwise, the port returns to the MONITORING state 16.
In the RECEIVED CLOSE state 26, the port continues to transmit data frames until all buffer credits are exhausted or until all the outgoing data has been sent. The port then transmits a CLS Transmission Word and returns to the MONITORING state 16.
In the OPENED state 28, the port transmits data frames until all buffer credits are exhausted or until all the outgoing data has been sent. The port concludes the outgoing data with a CLS Transmission Word. If during the transfer of data, the port receives a CLS Transmission Word, it enters the RECEIVED CLOSE state 26. Otherwise, after transmitting a CLS Transmission Word, the port moves to the XMITTED CLOSE state 30. In the XMITTED CLOSE state 30, after CLS Transmission Word is received, the port returns to the MONITORING state 26.
During the loop initialization procedure, each node is assigned an arbitrated loop physical address (ALPA) from a pool of 127 available addresses. This occurs in the following manner. While in the OPEN-INIT state, each port begins transmitting LISM data frames. Initially, the LISM data frames include three fields: D.sub.-- ID, S.sub.-- ID, and Port Name. The first two fields are three bytes long, and the Port Name is eight bytes long. The values of these fields are determined by firmware and they are used to determine priority. In comparing LISM frames, the LISM frame with smaller D.sub.-- ID value is algebraically lower. If the D.sub.-- ID values are equal, then the LISM frame with the smaller S.sub.-- ID value is algebraically lower. If both the S.sub.-- ID and D.sub.-- ID values are equal, then the LISM frame with the smaller Port Name is algebraically lower.
During the initialization procedure, the ports compare any received LISM frames to their current LISM frames. If the received LISM frame is algebraically lower than the current LISM frame, the received LISM becomes the current LISM frame which the port re-transmits. Algebraically higher LISM frames are ignored and not retransmitted. When the received LISM frame is equal to the port's original LISM frame, this is taken as an indication that the port's LISM frame has made it all the way around the loop and the originating port has the lowest LISM frame. This in causes the originating port to assume the role of Loop Initialization Master. The Loop Initialization Master assumes control of the loop by transmitting an ARB Transmission Word. Once the ARB Transmission Word has completed its circuit of the loop, the Loop Initialization Master begins an iterative procedure for determining ALPAs for all the active ports on the loop.
It is desirable for all loop interactions by a port to be conducted in a minimum amount of time to provide for the highest possible data throughput. The high data rates require that a large part of the Fibre Channel protocol be handled by hardware. Yet to keep implementation complexity low, it is desirable to implement only the simplest processes in hardware and to allow the more complex operations to be handled by software. The loop initialization process in particular is a somewhat complex procedure which could benefit from hardware support if the implementation complexity can be kept low.